package com.dingqb.ktdemo.oop

open class ExtendBS {
	fun bar() {
		println("ExtendBS bar");
	}

	fun foo() {
		println("ExtendBS foo");
	}
}


class ExtendBS_2 {
	fun ExtendBS.bar() {
		println("ExtendBS.bar bar");
	}

	fun ExtendBS.foo() {
		println("ExtendBS.foo foo");
	}

	fun bar() {
		println("ExtendBS_2 bar");
	}

	fun foo() {
		println("ExtendBS_2 foo");
	}

	fun bs(bs: ExtendBS) {
		bs.foo();
	}
}

fun main(arg: Array<String>) {
	var extendbs = ExtendBS();
	var _2 = ExtendBS_2();
	_2.bs(extendbs);


}
